// my_array_map.js

module.exports = function map(arr, fn) {
    let result = []
    arr.reduce(function(acc, curr){
        acc.push(fn(curr))
        return acc
    }, result)
    return result
}